<script lang="ts">
    import { useClassList } from "../utils/useClassList";
    import { useStyle } from "../utils/useStyle";
    import type { FloorProps } from "./PageFooter";

    const props: FloorProps = $props();
    const classList = $derived(
        useClassList(props, "cm-footer-floor", {
            "cm-footer-floor-center": props.center,
            "cm-footer-floor-divider-top": props.dividerTop,
            "cm-footer-floor-divider-bottom": props.dividerBottom,
        }),
    );
    const style = $derived(useStyle(props, { padding: props.padding, color: props.color }));
</script>

<div class={classList} {style}>
    {@render props.children?.()}
</div>
